ceiling
Type
function
Summary
Returns the smallest integer greater than or equal to number.
Syntax
the ceiling of <number>
ceiling(<number>)
Description
Use the ceiling function to return the greatest integer less than or equal to a number.
The ceiling function does not always return the
integer closest to the number. For example, ceiling(5.1)
returns 6, but ceiling(4.99)
returns 5.
Parameters
Name | Type | Description |
---|---|---|
number | Any number, or expression that evaluates to a number. |
Examples
ceiling(33.567) -- result is 34
ceiling(-6.3) -- result is -6
Related
control structure: function
glossary: return
keyword: integer
Compatibility and Support
Introduced
LiveCode 7.1
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile